class Solution:
    def isPalindrome(self, x: int) -> bool:
        lis = []
        s = str(x)
        list1 = list(s)
        for i in range(len(s)):
            lis.append(list1[i])
        for i in range(len(list1)//2):
            if list1[i] != list1[len(list1)-i-1]:
                return False
        return True

print(Solution().isPalindrome(12313211))